#ifndef __INET_ADDR__
#define __INET_ADDR__
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <unistd.h>
#include<string>
#include <arpa/inet.h>
using std::string;

class inetAddr{
public:
    inetAddr(string addr,unsigned short port);
    ~inetAddr();
    struct sockaddr* getsockaddr();
private:
    struct sockaddr_in _skaddr; 
    unsigned short _port; //端口
    string _addr; //ip地址
};
#endif